Matrix basics

Dot product (projection product)

Properties

#TODO: add examples here

Cosine & dot product

A·B=|A||B|cosθ

Projection

A·B|A|=|B|cosθ A·B|A|A|A|=A·BA·AA=A·B|A|2A

Changing basis

Basis is a set of n vectors which are linearly independent and form an n-dimensional space, i.e. if a, b, and c are linearly independent, for any pa and pb:

cpaa+pbb

According to vector projection formula, project A on the new basis (k1,k2):

A=A·k1|k1|2k1+A·k2|k2|2k2

thus, A in the new basis is:

Ak=[A·k1|k1|2,A·k2|k2|2]

Application of changing basis

PCA

Matrix multiplication

Matrices make transformations on vectors, potentially changing their magnitude and direction.

Key to solving simultaneous equation problems is appreciating how vectors are transformed by matrices, which is the heart of linear algebra.

Matrix Inverses

Gaussian elimination, also known as row reduction, is an algorithm in linear algebra for solving a system of linear equations.

For

A(abc)=S

The idea is using row operations on both A and S until A has a row echelon form:

(101001)

then you can calculate a,b,c.

Gaussian elimination can help in calculating inverse matrix A1 of A by tranforming:

(A|I)

->

(I|A1)

Determinant

For

A=(abcd)

the determinant is

det(A)=|A|=adbc

when det(A)=0, (ac) and (bd) are linear dependent and unable to apply Gaussian elimination.